<?php
// uncomment the following to define a path alias
// Yii::setPathOfAlias('local','path/to/local-folder');

// This is the main Web application configuration. Any writable
// CWebApplication properties can be configured here.
$list = array(
    dirname(__FILE__).'/database.php',
    dirname(__FILE__).'/params.php',
);
foreach ($list as $key => $value) {
    if ($key == 0) $config = require($value);
    else $config = CMap::mergeArray($config, require($value));
}

return CMap::mergeArray(
$config,
array(
	'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
	'name'=>'My Web Application',

	// preloading 'log' component
	'preload'=>array('log'),

	// autoloading model and component classes
	'import'=>array(
		'application.models.*',
		'application.components.*',
	),

	'modules'=>array(
		// uncomment the following to enable the Gii tool
		'gii'=>array(
			'class'=>'system.gii.GiiModule',
			'password'=>'letdata123@',
		 	// If removed, Gii defaults to localhost only. Edit carefully to taste.
			'ipFilters'=>array('127.0.0.1','::1'),
		),        
        'cat',
        'account',
        
	),

	// application components
	'components'=>array(
        'urlManager'=>array(
            'urlFormat'=>'path',
            'rules'=>array(
                '<module:\w+>/<controller:\w+>/<action:\w+>'=>'<module>/frontend/<controller>/<action>',                
                '<module:\w+>/<controller:\w+>'=>'<module>/backend/<controller>',
                
//                '<module:\w+>/<controller:\w+>/<action:\w+>'=>'<module>/$elFinder/<controller>/<action>',                
//                '<module:\w+>/<controller:\w+>'=>'<module>/frontend/<controller>',
            ),
            'showScriptName'=>false,
            'caseSensitive'=>false, 
            'urlSuffix' => '.html',
        ),
		'errorHandler'=>array(
			// use 'site/error' action to display errors
            'errorAction'=>'site/error',
        ),
		'user'=>array(
			// enable cookie-based authentication
			'allowAutoLogin'=>true,
		),
		'log'=>array(
			'class'=>'CLogRouter',
			'routes'=>array(
				array(
					'class'=>'CFileLogRoute',
					'levels'=>'error, warning',
				),
				// uncomment the following to show log messages on web pages
				/*
				array(
					'class'=>'CWebLogRoute',
				),
				*/
			),
		),
	),
));